<?php


namespace app\common\exception;

class Http extends \think\exception\Handle
{
	public function render(\Exception $e)
	{
		if ($e instanceof \think\exception\ValidateException) {
		}
		if ($e instanceof \think\exception\HttpException) {
			if ($e->getStatusCode() == 404) {
				$result = MatchAppApiCustomInterface(response(), substr(urldecode(\think\facade\Request::baseUrl()), 1));
				return response($result->getData(), $result->getCode());
			}
		}
		return parent::render($e);
	}
}